home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 3
/
Cream of the Crop 3.iso
/
clipper
/
ks94an.zip
/
MENU.HDR
< prev
next >
Wrap
Text File
|
1994-04-25
|
3KB
|
90 lines
/******************************************************************************
The Klipper Library, for CA-Clipper 5.x
Copyright (c), 1994, Wallace Information Systems Engineering
FUNCTION:
_Menu( nMenuTopRow, nMenuLeftCol, cMenuTitle, cMenuArray ) --> nSelection
PARAMETERS:
nMenuTopRow : Menu Top Left ROW
nMenuLeftCol : Menu Top Left COLUMN
cMenuTitle : Menu Title
cMenuArray : Array of Menu Elements
SHORT:
General purpose menu facility.
DESCRIPTION:
_Menu() is a general purpose menuing facility. It accepts as a parameter
an array of character strings to be used as menu items. It builds the
menu, prompts for a selection and returns the number of the element
selected as it's return value. If ESC is pressed, it returns ZERO.
NOTE:
This function is the engine of _KMENU() which manages menu configurations
external to the program (in data files) and makes calls to _menu() to display
menus.
COLORS. The menu uses a set of default colors. If the default colors are
not desireable, they may be changed by defining a few PRIVATE memory
variables that will be in scope when the menu is called:
_FSDeskColor // desktop color
_FSHeadColor // Top screen header color
_FSBottColor // bottom line color
_FSNameColor // menu name color
_FSMenuColor // menu body color
_FSBordColor // menu border color
_FSItemColor // menu item color
For a fairly decent monochrome scheme, try:
PRIVATE _FSDeskColor := 'w/n'
PRIVATE _FSHeadColor := 'w+/n'
PRIVATE _FSBottColor := 'n/w'
PRIVATE _FSNameColor := 'n/w'
PRIVATE _FSMenuColor := 'n/w'
PRIVATE _FSBordColor := 'n/w'
PRIVATE _FSItemColor := 'n/w,w/n'
The default colors are (These are the colors used by the KLIPDOCS.EXE
program):
_FSHeadColor = 'b/w'
_FSBottColor = 'n/w'
_FSDeskColor = 'rb/b,w+/b'
_FSMenuColor = 'n/w,w+/n'
_FSBordColor = 'n/w,w+/n'
_FSItemColor = 'n/w,w+/b'
_FSNameColor = 'b/w'
EXAMPLE:
MEMVAR acMainMenu
PRIVATE acMainMenu[5]
acMainMenu[1] = 'Menu Option One '
acMainMenu[2] = 'Menu Option Two '
acMainMenu[3] = 'Menu Option Three '
acMainMenu[4] = 'Menu Option Four '
acMainMenu[5] = 'Menu Option Five '
nMenuOpt = _Menu(10,10,'MAIN MENU','acMainMenu')
Result: A light-bar menu is displayed with the array elements in mainmenu[]
as selectable options. Once an item is selected, the number of that option
is returned as it's return value. The TOP LEFT corner of the menu is at
ROW 10, COL 10, and the bottom right hand corner is placed according to
the number of array elements and the length of the FIRST (not longest)
array element.
******************************************************************************/